<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {


/*1首页 2，B2B2B 3，B2B2C 4，B2C 5，解决方案 6，电商资讯 7，关于我们*/

public function advice(){
     $dataInfo = M('seotext')->where('col = 3')->find();
	 $this->assign('keywords',$dataInfo['keywords']);
	 $this->display('Index/advice');
    }	
	
	public function index(){
	        header('Content-Type:text/html;charset=utf-8');
		 //--------------------------------------------------
		 
		  $dataInfo = M('seotext')->where('col = 1')->find();
		  $this->assign('title',$dataInfo['title']);
	      $this->assign('keywords',$dataInfo['keywords']);
		  $this->assign('description',$dataInfo['description']);
		  $this->assign('active1','active');
	      $this->display();
              
         }
	
	
	public function b2b2b(){
	 header('Content-Type:text/html;charset=utf-8');
     $dataInfo = M('seotext')->where('col = 2')->find();
	 $this->assign('title',$dataInfo['title']);
	 $this->assign('keywords',$dataInfo['keywords']);
	 $this->assign('description',$dataInfo['description']);
	  $this->assign('active2','active');
	 $this->display('Index/b2b2b');
    }	
	
	
	public function b2b2c(){
	 header('Content-Type:text/html;charset=utf-8');
     $dataInfo = M('seotext')->where('col = 3')->find();
	 $this->assign('title',$dataInfo['title']);
	 $this->assign('keywords',$dataInfo['keywords']);
     $this->assign('description',$dataInfo['description']);
	  $this->assign('active2','active');
	 $this->display('Index/b2b2c');
    }	
	
	
	public function b2c(){
	 header('Content-Type:text/html;charset=utf-8');
     $dataInfo = M('seotext')->where('col = 4')->find();
	 $this->assign('title',$dataInfo['title']);
	 $this->assign('keywords',$dataInfo['keywords']);
     $this->assign('description',$dataInfo['description']);
	  $this->assign('active2','active');
	 $this->display('Index/b2c');
    }	
	
	
	public function cases(){
	 header('Content-Type:text/html;charset=utf-8');
     $dataInfo = M('seotext')->where('col = 5')->find();
	 $this->assign('title',$dataInfo['title']);
	 $this->assign('keywords',$dataInfo['keywords']);
     $this->assign('description',$dataInfo['description']);
	  $this->assign('active5','active');
	 $this->display('Index/cases');
    }	
	
	public function about(){
	 header('Content-Type:text/html;charset=utf-8');
     $dataInfo = M('seotext')->where('col = 7')->find();
	 $this->assign('title',$dataInfo['title']);
	 $this->assign('keywords',$dataInfo['keywords']);
     $this->assign('description',$dataInfo['description']);
	  $this->assign('active6','active');
	 $this->display('Index/about');
    }	
	
    public  function  addMessage(){
	   $data['phone'] = I('phone');
	   $data['add_time'] = time();
	   if( I('phone') ){
	    $result = M('user_phone')->add($data);
    	} 
	
	
	if( $result){
	    $info['status'] = 100;
		$this->ajaxReturn($info);
	  }
	
	}
	
}